home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / MAGS.ZIP / VLAD#2.ZIP / ARTICLE.2_3 < prev    next >
Encoding:
Text File  |  1994-10-28  |  4.6 KB  |  99 lines

  1.  
  2.    Flash bios!
  3.    +---------+
  4.  
  5.    Flash Memory : Non-Volatile memory which augments EPROM functionality
  6.                    with in-circuit electrical erasure and reprogramming.
  7.  
  8.    Flash BIOS   : Flash Memory used for storing BIOS software to allow easy
  9.                    upgrade.
  10.                  
  11.                  - Desmond Yuen, Intel's SL Architecture, 1993.
  12.  
  13.    Qark's translation : A new place to store virii!
  14.  
  15.  
  16.    Non-Volatile memory is like normal memory but when you turn your
  17.    computer off, the stuff you put on it earlier is still there!  But this
  18.    isn't actually useful to us VXers unless the code stored is executed later
  19.    on.  Thanx to Intel this dream is a reality due to the advent of Flash
  20.    BIOS!  This memory is present in 90% of laptop computers, most pentiums,
  21.    most 486 DX2?? and 486DX4?? and also found in some ordinary computers.
  22.    It is always present in the 386SL processor.
  23.  
  24.    As you all know, (or should do) BIOS is executed when you boot your
  25.    machine.  So, all your average funky VXer has to do is modify the BIOS
  26.    slightly to run your virus before actually booting.
  27.  
  28.    Imagine the looks on the faces of the AVers when they remove the
  29.    virus from all their boot sectors and files only to reboot and have it
  30.    back again!  Even funnier - they _can't_ boot clean!  Even if they boot
  31.    from a write protected disk the virus will still be there fiddling with
  32.    the interrupts!  They'd probably have to remove their memory and install
  33.    a whole new set to remove the damn thing.  Infact if the memory has been
  34.    surface mounted (welded) they will have to buy a whole new motherboard!
  35.  
  36.    I'm not quite sure if flash BIOS is mapped or if BIOS shadowing affects
  37.    it at all but I think this will work on most of them... if it doesn't
  38.    infect properly it'll just completely fuck their computer up so that's
  39.    half the job done there :)
  40.  
  41.    Anyway here is a short algorithm I just made up quickly.  I'm not quite
  42.    sure of what I'm doing but remember that noone has done this before.
  43.  
  44.         ;This pseudocode assumes it's in a virus executed somewhere.
  45.  
  46.         Test for flash BIOS
  47.         Test to see if BIOS already infected    (Fuck off if so)
  48.         Read Int19h vector from interrupt table. (The boot interrupt)
  49.         Read first five bytes from the Int19h entry point.
  50.         Scan the BIOS for a buffer of zero's the size of the virus.
  51.         Set Flash BIOS to write mode            (Normally its readonly)
  52.         Write the virus to the buffer we found.
  53.         Write a jump to our virus at the int19h entry point
  54.         Set flash BIOS to read mode
  55.         ;;;
  56.  
  57.       Ok, that looks like a workable algorithm. (Made it up as I went :)
  58.      
  59.    Int19h is only called during the boot process and it's only purpose
  60.    is to load the boot sector into memory and then execute it.  Thus a good
  61.    interrupt to choose methinks.  By the time its called all the interrupts
  62.    are set and everything is done.
  63.  
  64.    Also take into account that you can't read and write from flash BIOS at
  65.    the same time.  This means you can't store temporary variables when the
  66.    virus is run, therefore I'd suggest doing the conventional boot sector
  67.    thing and moving it above the memory allocation and setting the int13h to
  68.    it from there.   (This is pretty tough stuff!)
  69.  
  70.    Anyway, I'll have a go at doing the worlds first Flash BIOS infector
  71.    here is the information you'll need to write your own... the AMI-FLASH!
  72.    (Thanx AMI for this !  We'll put it to good use fucking you up hehe)
  73.  
  74.    AMI BIOS has it's specification written up for flash BIOSes to use.
  75.    It's based around int16h function 0e0h.  The funny thing is that once
  76.    the virus is loaded it can snatch that function and stop any AV software
  77.    from using it to clean!  hehe then you'll have things like AVers trying 
  78.    to tunnel int16h to get the original vector... and viruses will bung in
  79.    their own anti-tunneling code... and so on...
  80.  
  81.    It's fucking scarey when you think about it.  You'll have the hardest
  82.    time ever removing one from your memory.  They'll probably have to
  83.    remove their chips and replace them.  hehe and they'll forget one of
  84.    their disks is infected and they'll be fucked again...
  85.  
  86.    The AMI Flash specification is in another article.
  87.    
  88.    Also check the books : 
  89.    
  90.    Intel's SL Architecture, Desmond Yuen, 1993, McGraw Hill
  91.    
  92.    Dipert,D., and D. Verner, "Designing an Updatable BIOS Using Flash
  93.    Memory,"Intel Corporation, 1991.
  94.    (I wish I had this book, but I ripped this from the references at the
  95.    bottom of chapter 14 in the top one hehe)
  96.  
  97.                                 Qark/VLAD
  98.  
  99.